import request from "./http.js";
//歌曲列表
function getSongList(type,size=6,offset=0) {
    const url = "/ltw/v1/restserver/ting?method=baidu.ting.billboard.billList&type="+type+"&size="+size+"&offset="+offset
    return request.get(url)

}
//歌手信息
function getSongDetail(songid) {
    const url = `/ltw/v1/restserver/ting?method=baidu.ting.song.play&songid=${songid}`;
    return request.get(url);
}
//歌手的歌单
function getSingerDetail(limits,tinguid) {
    const url = `/ltw/v1/restserver/ting?method=baidu.ting.artist.getSongList&limits=${limits}&tinguid=${tinguid}`;
    return request.get(url);

}
//歌手详情信息
function getSingerInfo(tinguid) {
    const url = `/ltw/v1/restserver/ting?method=baidu.ting.artist.getInfo&tinguid=${tinguid}`;
    return request.get(url);

}
//搜索接口
function getsearchDetail(query) {
    const url = `/ltw//v1/restserver/ting?method=baidu.ting.search.catalogSug&query=${query}`;
    console.log(url)
    return request.get(url);
}
export {getSongList,getSongDetail,getSingerDetail,getSingerInfo,getsearchDetail}